You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > Statistics.MDScaleStress Method
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
Statistics.MDScaleStress Method

The stress factor for multidimensional scaling.

Syntax
C#
Visual Basic
public static double MDScaleStress([In] TMtx D, [In] TMtx DHat);
Parameters 
Description 
[In] TMtx D 
Data distance matrix. 
[In] TMtx DHat 
Estimated distance matrix. 

The stress factor.

Calculates the GOF statistics for multidimensional scaling. The stress factor is defined as: 

 

 

where hat(d(i,j)) is the predicted distance based on the MDS model. In his original paper on multi dimensional scaling, Kruskal (1964) gave following advise about stress values based on his experience:

Stress 
Goodness-of-fit 
0.2  
poor  
0.1  
fair  
0.05  
good  
0.025  
excellent  
0.000  
perfect  

More recent articles caution against using a table like this since acceptable values of stress depends on the quality of the distance matrix and the number of objects in that matrix.

D stores data distance matrix, DHat stores reduced dimension estimated distance matrix.

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples { private void Example() { Matrix D = new Matrix(2, 2); Matrix DHat = new Matrix(2, 2); D.SetIt(2, 2, false, new double[4] { 0.3, 3, 2, 0.1 }); DHat.SetIt(2, 2, false, new double[4] { 0.1, 3.1, 2.2, 0.3 }); // Calculate stress value - measure for GOF // Smaller stress value means better GOF. double stress = Statistics.MDScaleStress(D, DHat); } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!